package org.chengn.level_middle.context1954;

/**
 * @Title: Context1954
 * @Author ChengN
 * @Package org.chengn.level_middle.context1954
 * @Date 2023/12/24 19:47
 * @description: 收集足够苹果的最小花园周长
 */
public class Context1954 {
    public long minimumPerimeter(long neededApples) {
        long n = 1;
        while (2 * n * (n + 1) * (2 * n + 1) < neededApples)
            n++;
        return n * 8;
    }
}
